cmake_minimum_required(VERSION 4.1)
project("chapter_2_link_lists")

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_COMPILER GCC)

# glob sources
file(GLOB_RECURSE sources "lib/*.c" "../common/*.c")

# glob headers
file(GLOB includes LIST_DIRECTORIES TRUE "lib/*" "../common/*")
list(REMOVE_ITEM includes sources)
include_directories(${includes})

# Define DEBUG_MODE marco
# add_definitions(-DDEBUG_MODE -DDESKTOP_MODE)
add_definitions(-DDEBUG_MODE)



add_executable(ch2.work_1 ${sources} work.1.c)

add_executable(ch2.work_2 ${sources} work.2.c)

add_executable(ch2.work_3 ${sources} work.3.c)


